/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VoEnquiryEmail.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VoEnquiryEmail extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("voEnquiryEmail") == null)
            {
                flash.net.registerClassAlias("voEnquiryEmail", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("voEnquiryEmail", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _VoEnquiryEmailEntityMetadata;

    /**
     * properties
     */
    private var _internal_quantityEmail : ArrayCollection;
    private var _internal_enq_noEmail : String;
    private var _internal_pro_nameEmail : ArrayCollection;
    private var _internal_remarksEmail : ArrayCollection;
    private var _internal_stamp_noEmail : ArrayCollection;
    private var _internal_other_part_noEmail : ArrayCollection;
    private var _internal_supplierEmail : ArrayCollection;
    private var _internal_prat_noEmail : ArrayCollection;
    private var _internal_baseRemarksEmail : String;

    private static var emptyArray:Array = new Array();


    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VoEnquiryEmail()
    {
        _model = new _VoEnquiryEmailEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "quantityEmail", model_internal::setterListenerQuantityEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_noEmail", model_internal::setterListenerEnq_noEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_nameEmail", model_internal::setterListenerPro_nameEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "remarksEmail", model_internal::setterListenerRemarksEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "stamp_noEmail", model_internal::setterListenerStamp_noEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "other_part_noEmail", model_internal::setterListenerOther_part_noEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "supplierEmail", model_internal::setterListenerSupplierEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "prat_noEmail", model_internal::setterListenerPrat_noEmail));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "baseRemarksEmail", model_internal::setterListenerBaseRemarksEmail));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get quantityEmail() : ArrayCollection
    {
        return _internal_quantityEmail;
    }

    [Bindable(event="propertyChange")]
    public function get enq_noEmail() : String
    {
        return _internal_enq_noEmail;
    }

    [Bindable(event="propertyChange")]
    public function get pro_nameEmail() : ArrayCollection
    {
        return _internal_pro_nameEmail;
    }

    [Bindable(event="propertyChange")]
    public function get remarksEmail() : ArrayCollection
    {
        return _internal_remarksEmail;
    }

    [Bindable(event="propertyChange")]
    public function get stamp_noEmail() : ArrayCollection
    {
        return _internal_stamp_noEmail;
    }

    [Bindable(event="propertyChange")]
    public function get other_part_noEmail() : ArrayCollection
    {
        return _internal_other_part_noEmail;
    }

    [Bindable(event="propertyChange")]
    public function get supplierEmail() : ArrayCollection
    {
        return _internal_supplierEmail;
    }

    [Bindable(event="propertyChange")]
    public function get prat_noEmail() : ArrayCollection
    {
        return _internal_prat_noEmail;
    }

    [Bindable(event="propertyChange")]
    public function get baseRemarksEmail() : String
    {
        return _internal_baseRemarksEmail;
    }

    /**
     * data property setters
     */

    public function set quantityEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_quantityEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_quantityEmail = value;
            }
            else if (value is Array)
            {
                _internal_quantityEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of quantityEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quantityEmail", oldValue, _internal_quantityEmail));
        }
    }

    public function set enq_noEmail(value:String) : void
    {
        var oldValue:String = _internal_enq_noEmail;
        if (oldValue !== value)
        {
            _internal_enq_noEmail = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_noEmail", oldValue, _internal_enq_noEmail));
        }
    }

    public function set pro_nameEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_nameEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_nameEmail = value;
            }
            else if (value is Array)
            {
                _internal_pro_nameEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_nameEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_nameEmail", oldValue, _internal_pro_nameEmail));
        }
    }

    public function set remarksEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_remarksEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_remarksEmail = value;
            }
            else if (value is Array)
            {
                _internal_remarksEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of remarksEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "remarksEmail", oldValue, _internal_remarksEmail));
        }
    }

    public function set stamp_noEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_stamp_noEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_stamp_noEmail = value;
            }
            else if (value is Array)
            {
                _internal_stamp_noEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of stamp_noEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "stamp_noEmail", oldValue, _internal_stamp_noEmail));
        }
    }

    public function set other_part_noEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_other_part_noEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_other_part_noEmail = value;
            }
            else if (value is Array)
            {
                _internal_other_part_noEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of other_part_noEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "other_part_noEmail", oldValue, _internal_other_part_noEmail));
        }
    }

    public function set supplierEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_supplierEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_supplierEmail = value;
            }
            else if (value is Array)
            {
                _internal_supplierEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of supplierEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "supplierEmail", oldValue, _internal_supplierEmail));
        }
    }

    public function set prat_noEmail(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_prat_noEmail;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_prat_noEmail = value;
            }
            else if (value is Array)
            {
                _internal_prat_noEmail = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of prat_noEmail must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "prat_noEmail", oldValue, _internal_prat_noEmail));
        }
    }

    public function set baseRemarksEmail(value:String) : void
    {
        var oldValue:String = _internal_baseRemarksEmail;
        if (oldValue !== value)
        {
            _internal_baseRemarksEmail = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "baseRemarksEmail", oldValue, _internal_baseRemarksEmail));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerQuantityEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerQuantityEmail);
            }
        }
        _model.invalidateDependentOnQuantityEmail();
    }

    model_internal function setterListenerEnq_noEmail(value:flash.events.Event):void
    {
        _model.invalidateDependentOnEnq_noEmail();
    }

    model_internal function setterListenerPro_nameEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_nameEmail);
            }
        }
        _model.invalidateDependentOnPro_nameEmail();
    }

    model_internal function setterListenerRemarksEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerRemarksEmail);
            }
        }
        _model.invalidateDependentOnRemarksEmail();
    }

    model_internal function setterListenerStamp_noEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerStamp_noEmail);
            }
        }
        _model.invalidateDependentOnStamp_noEmail();
    }

    model_internal function setterListenerOther_part_noEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerOther_part_noEmail);
            }
        }
        _model.invalidateDependentOnOther_part_noEmail();
    }

    model_internal function setterListenerSupplierEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSupplierEmail);
            }
        }
        _model.invalidateDependentOnSupplierEmail();
    }

    model_internal function setterListenerPrat_noEmail(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPrat_noEmail);
            }
        }
        _model.invalidateDependentOnPrat_noEmail();
    }

    model_internal function setterListenerBaseRemarksEmail(value:flash.events.Event):void
    {
        _model.invalidateDependentOnBaseRemarksEmail();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.quantityEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_quantityEmailValidationFailureMessages);
        }
        if (!_model.enq_noEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_noEmailValidationFailureMessages);
        }
        if (!_model.pro_nameEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_nameEmailValidationFailureMessages);
        }
        if (!_model.remarksEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_remarksEmailValidationFailureMessages);
        }
        if (!_model.stamp_noEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_stamp_noEmailValidationFailureMessages);
        }
        if (!_model.other_part_noEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_other_part_noEmailValidationFailureMessages);
        }
        if (!_model.supplierEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_supplierEmailValidationFailureMessages);
        }
        if (!_model.prat_noEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_prat_noEmailValidationFailureMessages);
        }
        if (!_model.baseRemarksEmailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_baseRemarksEmailValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VoEnquiryEmailEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VoEnquiryEmailEntityMetadata) : void
    {
        var oldValue : _VoEnquiryEmailEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfQuantityEmail : Array = null;
    model_internal var _doValidationLastValOfQuantityEmail : ArrayCollection;

    model_internal function _doValidationForQuantityEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfQuantityEmail != null && model_internal::_doValidationLastValOfQuantityEmail == value)
           return model_internal::_doValidationCacheOfQuantityEmail ;

        _model.model_internal::_quantityEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isQuantityEmailAvailable && _internal_quantityEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "quantityEmail is required"));
        }

        model_internal::_doValidationCacheOfQuantityEmail = validationFailures;
        model_internal::_doValidationLastValOfQuantityEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_noEmail : Array = null;
    model_internal var _doValidationLastValOfEnq_noEmail : String;

    model_internal function _doValidationForEnq_noEmail(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfEnq_noEmail != null && model_internal::_doValidationLastValOfEnq_noEmail == value)
           return model_internal::_doValidationCacheOfEnq_noEmail ;

        _model.model_internal::_enq_noEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_noEmailAvailable && _internal_enq_noEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_noEmail is required"));
        }

        model_internal::_doValidationCacheOfEnq_noEmail = validationFailures;
        model_internal::_doValidationLastValOfEnq_noEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_nameEmail : Array = null;
    model_internal var _doValidationLastValOfPro_nameEmail : ArrayCollection;

    model_internal function _doValidationForPro_nameEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_nameEmail != null && model_internal::_doValidationLastValOfPro_nameEmail == value)
           return model_internal::_doValidationCacheOfPro_nameEmail ;

        _model.model_internal::_pro_nameEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_nameEmailAvailable && _internal_pro_nameEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_nameEmail is required"));
        }

        model_internal::_doValidationCacheOfPro_nameEmail = validationFailures;
        model_internal::_doValidationLastValOfPro_nameEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfRemarksEmail : Array = null;
    model_internal var _doValidationLastValOfRemarksEmail : ArrayCollection;

    model_internal function _doValidationForRemarksEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfRemarksEmail != null && model_internal::_doValidationLastValOfRemarksEmail == value)
           return model_internal::_doValidationCacheOfRemarksEmail ;

        _model.model_internal::_remarksEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isRemarksEmailAvailable && _internal_remarksEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "remarksEmail is required"));
        }

        model_internal::_doValidationCacheOfRemarksEmail = validationFailures;
        model_internal::_doValidationLastValOfRemarksEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfStamp_noEmail : Array = null;
    model_internal var _doValidationLastValOfStamp_noEmail : ArrayCollection;

    model_internal function _doValidationForStamp_noEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfStamp_noEmail != null && model_internal::_doValidationLastValOfStamp_noEmail == value)
           return model_internal::_doValidationCacheOfStamp_noEmail ;

        _model.model_internal::_stamp_noEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isStamp_noEmailAvailable && _internal_stamp_noEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "stamp_noEmail is required"));
        }

        model_internal::_doValidationCacheOfStamp_noEmail = validationFailures;
        model_internal::_doValidationLastValOfStamp_noEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfOther_part_noEmail : Array = null;
    model_internal var _doValidationLastValOfOther_part_noEmail : ArrayCollection;

    model_internal function _doValidationForOther_part_noEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfOther_part_noEmail != null && model_internal::_doValidationLastValOfOther_part_noEmail == value)
           return model_internal::_doValidationCacheOfOther_part_noEmail ;

        _model.model_internal::_other_part_noEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isOther_part_noEmailAvailable && _internal_other_part_noEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "other_part_noEmail is required"));
        }

        model_internal::_doValidationCacheOfOther_part_noEmail = validationFailures;
        model_internal::_doValidationLastValOfOther_part_noEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSupplierEmail : Array = null;
    model_internal var _doValidationLastValOfSupplierEmail : ArrayCollection;

    model_internal function _doValidationForSupplierEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSupplierEmail != null && model_internal::_doValidationLastValOfSupplierEmail == value)
           return model_internal::_doValidationCacheOfSupplierEmail ;

        _model.model_internal::_supplierEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSupplierEmailAvailable && _internal_supplierEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "supplierEmail is required"));
        }

        model_internal::_doValidationCacheOfSupplierEmail = validationFailures;
        model_internal::_doValidationLastValOfSupplierEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPrat_noEmail : Array = null;
    model_internal var _doValidationLastValOfPrat_noEmail : ArrayCollection;

    model_internal function _doValidationForPrat_noEmail(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPrat_noEmail != null && model_internal::_doValidationLastValOfPrat_noEmail == value)
           return model_internal::_doValidationCacheOfPrat_noEmail ;

        _model.model_internal::_prat_noEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPrat_noEmailAvailable && _internal_prat_noEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "prat_noEmail is required"));
        }

        model_internal::_doValidationCacheOfPrat_noEmail = validationFailures;
        model_internal::_doValidationLastValOfPrat_noEmail = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfBaseRemarksEmail : Array = null;
    model_internal var _doValidationLastValOfBaseRemarksEmail : String;

    model_internal function _doValidationForBaseRemarksEmail(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfBaseRemarksEmail != null && model_internal::_doValidationLastValOfBaseRemarksEmail == value)
           return model_internal::_doValidationCacheOfBaseRemarksEmail ;

        _model.model_internal::_baseRemarksEmailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isBaseRemarksEmailAvailable && _internal_baseRemarksEmail == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "baseRemarksEmail is required"));
        }

        model_internal::_doValidationCacheOfBaseRemarksEmail = validationFailures;
        model_internal::_doValidationLastValOfBaseRemarksEmail = value;

        return validationFailures;
    }
    

}

}
